<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
       /* var obj = new Object();
        obj.name = "xx";
        obj.age = 18;
        obj.sayHello = function() {
        };
        // 对象的构造函数
        // alert(obj.constructor);
        obj.constructor;
        // 是否有指定的属性
        console.log(obj.hasOwnProperty("name1"));*/

       var d=new Date();
       var time=d.getFullYear()+'-'+(d.getMonth()+1)+'-'+d.getDate();
       console.log(time);
       var t=`${d.getMonth()}-${d.getDate()}`;
       console.log(t);

      /* console.log(Math.random()*10);
       var r=Math.random()*10;
       console.log(Math.floor(r));
       console.log(1.456.toFixed(2));*/

    </script>
</body>
</html>